package com.design.cjm.structural.facade.example;

/**
 * 外观模式
 *
 * @Author: Jie Ming Chen
 * @Date: 2018/9/23
 * @Version 1.0
 */
public class Facade {

    private SubSystemOne subSystemOne;

    private SubSystemTwo subSystemTwo;

    private SubSystemThree subSystemThree;

    private SubSystemFour subSystemFour;

    public Facade() {

        subSystemOne = new SubSystemOne();
        subSystemTwo = new SubSystemTwo();
        subSystemThree = new SubSystemThree();
        subSystemFour = new SubSystemFour();
    }

    /**
     *  方法组A
     */
    public void methodA() {

        subSystemOne.methodOne();
        subSystemTwo.methodTwo();
        subSystemThree.methodThree();
        subSystemFour.methodFour();
    }

    /**
     *  方法组B
     */
    public void methodB() {

        subSystemOne.methodOne();
        subSystemTwo.methodTwo();
        subSystemThree.methodThree();
        subSystemFour.methodFour();
    }
}
